package com.yanmaohu.yulia.statement;

import com.yanmaohu.yulia.bean.DescriptorName;

/**
 * @author Bright Lee
 */
public final class DeallocateDescriptorStatement implements SystemDescriptorStatement {

    private int beginIndex;
    private int endIndex;
    private boolean sql;
    private DescriptorName descriptorName;

    public DeallocateDescriptorStatement(int beginIndex,
                                         boolean sql,
                                         DescriptorName descriptorName) {
        this.beginIndex = beginIndex;
        this.endIndex = descriptorName.getEndIndex();
        this.sql = sql;
        this.descriptorName = descriptorName;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public boolean isSql() {
        return sql;
    }

    public DescriptorName getDescriptorName() {
        return descriptorName;
    }

}
